//
//  HotelEntity.m
//  SXH
//
//  Created by 龚啸 on 15/9/16.
//  Copyright (c) 2015年 lyss. All rights reserved.
//

#import "HotelEntity.h"

@implementation HotelEntity




- (instancetype)initWithAttributes:(NSDictionary *)attributes
{
    self = [super init];
    if (!self) {
        return nil;
    }
    
    self.introduction_url = [NSString stringWithFormat:@"%@/%@",IMAGE_URL, [attributes valueForKeyPath:@"introduction_url"]];
    self.branch_name =[NSString stringWithFormat:@"(%@)",[attributes valueForKeyPath:@"branch_name"]];
    self.name = [attributes valueForKeyPath:@"name"];
    self.telephone = [attributes valueForKeyPath:@"telephone"];
    self.avg_price = [attributes valueForKeyPath:@"avg_price"];
    self.product_score = [attributes valueForKeyPath:@"product_score"];
    
    self.decoration_score = [attributes valueForKeyPath:@"decoration_score"];
    self.service_score = [attributes valueForKeyPath:@"service_score"];
    self.longitude = [attributes valueForKeyPath:@"longitude"];
    self.latitude = [attributes valueForKeyPath:@"latitude"];
    self.s_photo_url = [NSString stringWithFormat:@"%@/%@",IMAGE_URL,[attributes valueForKeyPath:@"s_photo_url"]];
    self.address = [attributes valueForKeyPath:@"address"];
    self.rating_s_img_url = [NSString stringWithFormat:@"%@/%@",IMAGE_URL, [attributes valueForKeyPath:@"rating_s_img_url"] ];
    self.has_deal = [attributes valueForKeyPath:@"has_deal"];
    self.has_online_reservation = [attributes valueForKeyPath:@"has_online_reservation"];
    self.avg_price = [attributes valueForKeyPath:@"avg_price"];
    self.photo_url = [NSString stringWithFormat:@"%@/%@",IMAGE_URL,[attributes valueForKeyPath:@"photo_url"]];
    
    self.avg_rating = [attributes valueForKeyPath:@"avg_rating"];
    self.has_coupon = [attributes valueForKeyPath:@"has_coupon"];
    return self;
    
}
@end
